package com.hu.system.domain;

import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hu.common.annotation.Excel;
import com.hu.common.core.domain.BaseEntity;

/**
 * 产品信息对象 product_info
 *
 * @author hu
 * @date 2025-01-21
 */
public class ProductInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 产品ID
     */
    private Long productId;

    /**
     * SKU编码（全局唯一）
     */
    @Excel(name = "SKU编码")
    @NotBlank(message = "SKU编码不能为空")
    @Size(min = 0, max = 100, message = "SKU编码长度不能超过100个字符")
    private String sku;

    /**
     * SKU货号（同款不同SKU可重复）
     */
    @Excel(name = "SKU货号")
    @NotBlank(message = "SKU货号不能为空")
    @Size(min = 0, max = 100, message = "SKU货号长度不能超过100个字符")
    private String skuCode;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    @NotBlank(message = "产品名称不能为空")
    @Size(min = 0, max = 200, message = "产品名称长度不能超过200个字符")
    private String productName;

    /**
     * SKU属性（如颜色、尺寸等）
     */
    @Excel(name = "SKU属性")
    @NotBlank(message = "SKU属性不能为空")
    @Size(min = 0, max = 500, message = "SKU属性长度不能超过500个字符")
    private String skuAttr;

    /**
     * 核价
     */
    @Excel(name = "核价")
    @NotNull(message = "核价不能为空")
    private BigDecimal priceCheck;

    /**
     * 产品状态（1:已下架 2:已上架 3:上新备货 4:清库存）
     */
    @Excel(name = "产品状态", readConverterExp = "1=已下架,2=已上架,3=上新备货,4=清库存")
    private String productStatus;

    /**
     * 所属店铺ID
     */
    @Excel(name = "所属店铺ID")
    private Long shopId;

    /**
     * 所属店铺名称（关联查询）
     */
    private String shopName;

    /**
     * 删除标志（0正常 2删除）
     */
    private String delFlag;

    /**
     * 产品ID数组（用于批量操作）
     */
    private Long[] productIds;

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public String getSku() {
        return sku;
    }

    public void setSkuCode(String skuCode) {
        this.skuCode = skuCode;
    }

    public String getSkuCode() {
        return skuCode;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductName() {
        return productName;
    }

    public void setSkuAttr(String skuAttr) {
        this.skuAttr = skuAttr;
    }

    public String getSkuAttr() {
        return skuAttr;
    }

    public void setPriceCheck(BigDecimal priceCheck) {
        this.priceCheck = priceCheck;
    }

    public BigDecimal getPriceCheck() {
        return priceCheck;
    }

    public void setProductStatus(String productStatus) {
        this.productStatus = productStatus;
    }

    public String getProductStatus() {
        return productStatus;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setProductIds(Long[] productIds) {
        this.productIds = productIds;
    }

    public Long[] getProductIds() {
        return productIds;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("productId", getProductId())
                .append("sku", getSku())
                .append("skuCode", getSkuCode())
                .append("productName", getProductName())
                .append("skuAttr", getSkuAttr())
                .append("priceCheck", getPriceCheck())
                .append("productStatus", getProductStatus())
                .append("shopId", getShopId())
                .append("shopName", getShopName())
                .append("remark", getRemark())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}

